package com.hbnu.iostream;

import java.io.File;

/**
 * 删除指定文件夹下的文件
 *
 * @author kittychen
 * @date 2025-09-29 10:32
 */
public class FileOperator02 {

    public static void main(String[] args) {
        String path = "E:" + File.separator + "2309" + File.separator + "test1.txt";

        File file = new File(path);

        if (file.exists()) {
            boolean result = file.delete();
            if (result) {
                System.out.println("删除成功");
            } else {
                System.out.println("删除失败");
            }
        }
    }
}
